<div class="menuBar">
    <a href="#/" class="left am-icon-arrow-circle-o-left backBtn" title="后退"></a>
    <div class="left menuTitle">职位维护</div>
</div>
<div id="content">
    <div id="contentLeft" class="clear" ng-content-left>
        <div id="contentLeftWrap">
            <div class="am-panel am-panel-default contentLeftPanel">
                <div class="am-panel-hd">字段筛选</div>
                <div class="am-panel-bd">
                    <input type="text" class="am-form-field am-input-sm" ng-model="positionCodeFilterInput" placeholder="编码"/>
                    <input type="text" class="am-form-field am-input-sm" ng-model="positionNameFilterInput"  placeholder="名称"/>
                    <input type="text" class="am-form-field am-input-sm" ng-model="positionOrganizationCodeFilterInput" placeholder="所属组织编码"/>
                    <input type="text" class="am-form-field am-input-sm" ng-model="positionOrganizationNameFilterInput" placeholder="所属组织"/>
                    <input type="text" class="am-form-field am-input-sm" ng-model="positionParentCodeFilterInput"  placeholder="上级职位编码"/>
                    <input type="text" class="am-form-field am-input-sm" ng-model="positionParentNameFilterInput"  placeholder="上级职位"/>
                    <input type="text" class="am-form-field am-input-sm" ng-model="positionJobCodeFilterInput"  placeholder="对应职务编码"/>
                    <input type="text" class="am-form-field am-input-sm" ng-model="positionJobNameFilterInput"  placeholder="对应职务"/>
                    <input type="text" class="am-form-field am-input-sm" ng-model="positionGradeFilterInput"  placeholder="级别"/>
                    <input type="text" class="am-form-field am-input-sm" ng-model="positionMarkFilterInput"  placeholder="标签"/>
                </div>
            </div>

            <div class="am-panel am-panel-default contentLeftPanel" ng-position-content-left-date-filter="">
                <div class="am-panel-hd">生效日期范围</div>
                <div class="am-panel-bd">

                    <div class="am-alert am-alert-danger" id="positionContentLeftDateFilterAlert" style="display: none">
                        <p>开始日期应小于结束日期！</p>
                    </div>

                    <div class="am-form-icon">
                        <i class="am-icon-close" id="positionContentLeftDateFilterStart"></i>
                        <input id="positionContentLeftDateFilterStartDate" ng-model="positionContentLeftDateFilterStartDate" type="text" class="am-form-field am-input-sm"  placeholder="起始生效日期">
                    </div>
                    <div class="am-form-icon">
                        <i class="am-icon-close" id="positionContentLeftDateFilterEnd"></i>
                        <input id="positionContentLeftDateFilterEndDate" ng-model="positionContentLeftDateFilterEndDate" type="text" class="am-form-field am-input-sm"  placeholder="结束生效日期">
                    </div>
                </div>
            </div>
            <div class="am-panel am-panel-default contentLeftPanel">
                <div class="am-panel-hd">状态筛选</div>
                <div class="am-panel-bd" id="contentLeftPanelStatusBd">
                    <label>
                        <input type="checkbox" checked ng-model="positionEnableTrueFilterInput" ng-change="positionEnableFilterInputChange()">包含启用
                    </label>
                    <label>
                        <input type="checkbox" checked ng-model="positionEnableFalseFilterInput" ng-change="positionEnableFilterInputChange()">包含禁用
                    </label>
                    <br>
                    <label>
                        <input type="checkbox" checked ng-model="positionImportantTrueFilterInput" ng-change="positionImportantFilterInputChange()">关键职位
                    </label>
                    <label>
                        <input type="checkbox" checked ng-model="positionImportantFalseFilterInput" ng-change="positionImportantFilterInputChange()">非关键职位
                    </label>
                </div>
            </div>
            <div class="am-panel am-panel-default contentLeftPanel">
                <div class="am-panel-hd">排序规则</div>
                <div class="am-panel-bd">
                    <select id="positionContentLeftSortSelect" ng-model="positionOrderFilterSelect" ng-amaze-select-up>
                        <option value="-effectiveDate">生效日期</option>
                        <option value="code">编码</option>
                        <option value="name">名称</option>
                        <option value="parentCode">父级编码</option>
                        <option value="parentName">父级名称</option>
                        <option value="organizationCode">组织编码</option>
                        <option value="organizationName">组织名称</option>
                        <option value="jobCode">对应职务编码</option>
                        <option value="jobName">对应职务名称</option>
                        <option value="grade">级别</option>
                        <option value="important">关键职位</option>
                        <option value="enable">状态</option>
                    </select>
                </div>
            </div>
        </div>
    </div>
    <div id="contentRight" ng-content-right>
        <div id="contentRightMenuBar">
            <div id="contentRightMenuBarWrap" >
                <button type="button" class="am-btn  am-btn-xs am-btn-default left"> <i class="am-icon-plus"></i>新建</button>
                <button type="button" class="am-btn am-btn-xs am-btn-default left"> <i class="am-icon-ban"></i>失效</button>
                <button type="button" class="am-btn am-btn-xs am-btn-default left"> <i class="am-icon-key"></i>生效</button>

                <div class="left" id="contentRightMenuBarRightDropdownWrap" ng-content-right-menu-bar-right-dropdown="">
                    <div class="am-dropdown" id="contentRightMenuBarRightDropdown">
                        <button class="am-btn am-btn-xs am-btn-default am-dropdown-toggle"> <i class="am-icon-bars"></i>更多操作<span class="am-icon-caret-down"></span></button>
                        <ul class="am-dropdown-content">
                            <li><a href="#">导入</a></li>
                            <li class="am-disabled"><a href="#">选中导出</a></li>
                            <li class="am-divider"></li>
                            <li><a href="#">删除</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div id="contentRightWrap" ng-content-right-wrap="">
            <table class="am-table am-table-hover">
                <thead>
                    <tr>
                        <th>
                          <input type="checkbox">
                        </th>
                        <th>编码</th>
                        <th>名称</th>
                        <th>所属组织编码</th>
                        <th>所属组织</th>
                        <th>上级职位编码</th>
                        <th>上级职位</th>
                        <th>对应职务编码</th>
                        <th>对应职务</th>
                        <th>关键职位</th>
                        <th>级别</th>
                        <th>生效日期</th>
                        <th>状态</th>
                    </tr>
                </thead>
                <tbody>
                    <tr  ng-repeat="position in positions|filter: {'code':positionCodeFilterInput,'name':positionNameFilterInput,'organizationCode':positionOrganizationCodeFilterInput,'organizationName':positionOrganizationNameFilterInput,'parentName':positionParentNameFilterInput,'parentCode':positionParentCodeFilterInput,'jobName':positionJobNameFilterInput,'jobCode':positionJobCodeFilterInput,'grade':positionGradeFilterInput,'mark':positionMarkFilterInput,'enable':positionEnableFilterInput,'important':positionImportantFilterInput}|positionsDateFilter:positionContentLeftDateFilterStartDateInput:positionContentLeftDateFilterEndDateInput| orderBy:positionOrderFilterSelect">
                        <td><input type="checkbox" name="positionCheckbox" value="{{position.id}}" ></td>
                        <td ng-click="$state.go('positionItem.basic',{positionCode:position.code})">{{position.code}}</td>
                        <td ng-click="$state.go('positionItem.basic',{positionCode:position.code})">{{position.name}}</td>
                        <td ng-click="$state.go('positionItem.basic',{positionCode:position.code})">{{position.organizationCode}}</td>
                        <td ng-click="$state.go('positionItem.basic',{positionCode:position.code})">{{position.organizationName}}</td>
                        <td ng-click="$state.go('positionItem.basic',{positionCode:position.code})">{{position.parentCode}}</td>
                        <td ng-click="$state.go('positionItem.basic',{positionCode:position.code})">{{position.parentName}}</td>
                        <td ng-click="$state.go('positionItem.basic',{positionCode:position.code})">{{position.jobCode}}</td>
                        <td ng-click="$state.go('positionItem.basic',{positionCode:position.code})">{{position.jobName}}</td>
                        <td ng-click="$state.go('positionItem.basic',{positionCode:position.code})" ng-show="position.important">关键职位</td>
                        <td ng-click="$state.go('positionItem.basic',{positionCode:position.code})" ng-show="!position.important">非关键职位</td>
                        <td ng-click="$state.go('positionItem.basic',{positionCode:position.code})">{{position.grade}}</td>
                        <td ng-click="$state.go('positionItem.basic',{positionCode:position.code})">{{position.effectiveDate | date : 'yyyy-MM-dd'}}</td>
                        <td ng-click="$state.go('positionItem.basic',{positionCode:position.code})" ng-show="position.enable">启用</td>
                        <td ng-click="$state.go('positionItem.basic',{positionCode:position.code})" ng-show="!position.enable">禁用</td>
                    </tr>
                </tbody>
        </table>
        </div>
    </div>
</div>